﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<textarea id="<%=ViewData["tinymceId"] %>" name="<%=ViewData["tinymceId"] %>" rows="15" cols="80" style="width: 80%" class="tinymce">

</textarea>
<script type="text/javascript" src="../../Scripts/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript">
      $(function () {
          tinyMCE.init({
              theme: "advanced",
              mode: "exact",
              elements: "<%=ViewData["tinymceId"] %>",
              language: "zh-cn",
              plugins: "pagebreak,style,layer,table,save,advhr,advimage,addimage,addmedia,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

              theme_advanced_buttons1: "code,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
              theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,image,addimage,addmedia",
              theme_advanced_buttons3: "",
              theme_advanced_buttons4: "",
              theme_advanced_toolbar_location: "top",
              theme_advanced_toolbar_align: "left",
              theme_advanced_statusbar_location: "bottom",
              theme_advanced_resizing: true,

              theme_advanced_fonts: "宋体=宋体,黑体=黑体,华文彩云=华文彩云",
              addimage_action: '<%:Url.Action("UploadFile","Common",new{area=""}) %>',
              addmedia_action: '<%:Url.Action("UploadFile","Common",new{area=""}) %>',
              font_size_style_values: "8pt,10pt,12pt,14pt,18pt,24pt,48pt",

              extended_valid_elements: "canvas[id|width|height],script[src|type]," +
                    "object[classid|codebase|width|height|align|name|id],param[name|value],embed[quality|type|pluginspage|width|height|src|align]," +
                    "iframe[src|frameborder|width|height|scrolling|name|id]," +
                    "video[src|audio|autoplay|controls|width|height|loop|preload|poster],audio[src|autoplay|loop|controls|preload],source[id|src|type]"
          });
      });
  </script>
